package com.becca.cake.dao.category;

import java.util.List;
import java.util.Map;

import org.springframework.dao.DataAccessException;
import org.springframework.stereotype.Repository;

import com.becca.cake.model.category.GoodCategoryModel;

/**
 * 分类管理Dao层接口
 * @copyright  尊星(上海)信息科技有限公司
 * @author mouwanming
 *
 */
@Repository
public interface GoodsCategoryDAO
{
	/**
	 * 查询分类名称
	 * @return
	 * @throws DataAccessException
	 */
	List<GoodCategoryModel> selectGoodCategoryName() throws DataAccessException;
	
	/**
	 * 查询所有分类
     * @param map 
	 * @return
	 * @throws DataAccessException
	 */
	List<GoodCategoryModel> selectGoodCategory(Map<String, Object> map) throws DataAccessException;
	
	/**
	 * 查询分类总条数
     * @param map 
	 * @return
	 * @throws DataAccessException
	 */
	Long selectGoodCategoryCount(Map<String, Object> map) throws DataAccessException;
	
	/**
	 * 添加分类信息
     * @param goodCategoryModel 
	 * @return
	 * @throws DataAccessException
	 */
	void insertGoodCategory(GoodCategoryModel goodCategoryModel) throws DataAccessException;
	
	/**
	 * 禁用 启用
     * @param map 
	 * @return
	 * @throws DataAccessException
	 */
	void updateGoodCategoryById(Map<String, Object> map) throws DataAccessException;
 	
	/**
	 * 修改分类信息
     * @param goodCategoryModel 
	 * @return
	 * @throws DataAccessException
	 */
	void updateGoodCategory(GoodCategoryModel goodCategoryModel) throws DataAccessException;
	
	/**
	 * 根据id查询分类信息
     * @param id 
	 * @return
	 * @throws DataAccessException
	 */
	GoodCategoryModel selectGoodCategoryById(Integer id) throws  DataAccessException;
	
	
}
